using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CHEnhanceEfCore.Models
{
    /// <summary>
    /// author: chenhao
    /// </summary>
    public class BaseModel
    {
        public BaseModel()
        {
            createdBy = Guid.Empty;
            updatedBy = Guid.Empty;
            createdTime = DateTime.Now;
            updatedTime = DateTime.Now;
        }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        [MaxLength(1024)]
        public string remark { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column("created_by")]
        public Guid createdBy { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        [Column("updated_by")]
        public Guid updatedBy { get; set; }

        /// <summary>
        /// 删除人
        /// </summary>
        [Column("deleted_by")]
        public Guid deletedBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("created_time")]
        public DateTime createdTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column("updated_time")]
        public DateTime updatedTime { get; set; }

        /// <summary>
        /// 删除时间    
        /// </summary>
        [Column("deleted_time")]
        public DateTime deletedTime { get; set; }
    }
}